package com.example.gzysmartcity.repository.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

@Entity
public class MyUser {
    @Id(autoincrement = true)
    private Long id;
    private String userName;
    private String loginName;
    private int schoolId;
    private String pic;
    private String phone;
    private String email;
    private String position;
    private int lastUpdateTime;

    public MyUser(UserInfo.DataBean userInfo) {
        this.userName = userInfo.getUserName();
        this.loginName = userInfo.getLoginName();
        this.schoolId = userInfo.getSchoolId();
        Object pic = userInfo.getPic();
        if (pic != null)
            this.pic = (String) userInfo.getPic();
        this.phone = userInfo.getPhone();
        this.email = userInfo.getEmail();
        this.position = userInfo.getPosition();
        this.lastUpdateTime = userInfo.getLastUpdateTime();
    }

    @Generated(hash = 175990462)
    public MyUser(Long id, String userName, String loginName, int schoolId,
                  String pic, String phone, String email, String position,
                  int lastUpdateTime) {
        this.id = id;
        this.userName = userName;
        this.loginName = loginName;
        this.schoolId = schoolId;
        this.pic = pic;
        this.phone = phone;
        this.email = email;
        this.position = position;
        this.lastUpdateTime = lastUpdateTime;
    }

    @Generated(hash = 623865568)
    public MyUser() {
    }


    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserName() {
        return this.userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getLoginName() {
        return this.loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public int getSchoolId() {
        return this.schoolId;
    }

    public void setSchoolId(int schoolId) {
        this.schoolId = schoolId;
    }

    public String getPic() {
        return this.pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPosition() {
        return this.position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public int getLastUpdateTime() {
        return this.lastUpdateTime;
    }

    public void setLastUpdateTime(int lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

}
